#@layout() #define script()
<script>

    function doDel(id) {
        ajaxGet("/admin/Journal/jpress_addon_journal/doDel/" + id);
    }

    $("#batchDel").click(function () {
        var ids = getSelectedIds();
        if (ids == "") {
            alert('您未选择任何条目');
            return
        }
        ajaxGet("/admin/Journal/jpress_addon_journal/doDelByIds?ids=" + ids);
    })

</script>
#end #define content()
<div class="content-wrapper">

	<section class="content-header">
		<h1>
			管理 <small>Items</small>
		</h1>
	</section>

	<section class="content">

		<div class="row">
			<div class="col-xs-12">
				<div class="box box-primary">
					<div class="box-header with-border">

						<form class="form-horizontal actionPanel"
							action="#(CPATH)/admin/Journal/jpress_addon_journal"
							method="get">
							<input type="hidden" name="status" value="#para('status')">
							<div class="row">
								<div class="form-group col-lg-3">
									<label class="col-sm-3 control-label">内容关键字</label>
									<div class="col-sm-9">
										<input type="text" class="form-control" name="content"
											value="#para('content' ??)">
									</div>
								</div>
								<div class="form-group col-lg-3">
									<label class="col-sm-3 control-label">状态</label>
									<div class="col-sm-9">
										<select name="status" class="form-control">
											<option value="">全部状态</option>
											<option value="1">通过</option>
											<option value="2">失效</option>
											<option value="3">待审核</option>
										</select>
									</div>
								</div>
								<div class="form-group col-lg-3">
									<div class="col-sm-12">
										<button type="submit" class="btn btn-primary ">查询</button>
									</div>
								</div>
							</div>
							<!-- /.box-body -->
						</form>
						<div class="row actionPanel">
							<div class="col-xs-12">
								<a href="jpress_addon_journal/edit" class="btn btn-primary ">
									<i class="fa fa-fw fa-plus"></i> 新建
								</a>
								<button type="submit" id="batchDel"
									class="btn btn-default checkAction">批量删除</button>
							</div>
						</div>

					</div>
					<!-- /.box-header -->
					<div class="box-body ">

						<table class="table table-striped">
							<tbody>
								<tr>
									<th style="width: 10px"><input name="dataItem"
										onchange="checkAll(this)" type="checkbox" /></th>
									<th>操作</th>
									<th>说说内容</th>
									<th>点赞数</th>
									<th>倒彩数</th>
									<th>添加时间</th>
									<th>修改时间</th>
									<th>状态</th>
								</tr>
								#for(entry : page.list)
								<tr class="jp-actiontr">
									<td><input class="dataItem" type="checkbox"
										value="#(entry.id)" /></td>
									<td><strong><a
											href="/admin/Journal/jpress_addon_journal/edit/#(entry.id)">编辑</a>
											| <a href="javascript:;" class="red-action"
											onclick="doDel('#(entry.id)')">删除</a></strong></td>
									<td>#maxLength(entry.content,25)</td>
									<td>#(entry.thumbsupCount ??)</td>
									<td>#(entry.catcallCount ??)</td>
									<td>#(entry.created ??)</td>
									<td>#(entry.editd ??)</td>
									<td><a
										href="/admin/Journal/jpress_addon_journal?status=#(entry.status)">
											#if(entry.status == 1) 通过 #elseif(entry.status == 2) 失效 #else
											待审核 #end </a></td>
								</tr>
								#end
							</tbody>
						</table>
					</div>
					<!-- /.box-body -->
					<div class="box-footer">
						<div class="row">
							<div class="col-sm-12">#@_paginate()</div>
						</div>
					</div>
				</div>
				<!-- /.box -->
			</div>
		</div>

	</section>
</div>
#end
